﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    internal class User_profile
    {
        /// <summary>
        /// ⽤户ID（与user表⼀对⼀）
        /// </summary>
        [Required]
        [Key]
        [ForeignKey("User_id")]
        public User? User { get; set; }

        /// <summary>
        /// 真实姓名（脱敏显示）
        /// </summary>
        [StringLength(32)]
        public string? Real_name { get; set; }

        /// <summary>
        /// 性别（0未知/1男/2⼥）
        /// </summary>
        public int gender { get; set; } = 0;//默认为0 未知

        /// <summary>
        /// 出⽣⽇期
        /// </summary>
        public DateTime Birthday { get; set; }

        /// <summary>
        /// 身份证号（加密存储）
        /// </summary>
        [StringLength(32)]
        public string? Id_card { get; set; }

        /// <summary>
        /// 头像OSS地址
        /// </summary>
        [StringLength(512)]
        public string? Avatar_url { get; set; }

        /// <summary>
        /// 职业
        /// </summary>
        [StringLength(64)]
        public string? Occupation { get; set; }

        /// <summary>
        /// 婚姻状况（0未填/1未婚/2已婚）
        /// </summary>
        public int Marital_status { get; set; }

        /// <summary>
        /// 信息创建时间
        /// </summary>
        [Required]
        public DateTime Create_time { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Required]
        public DateTime Update_time { get; set; }
    }
}
